package com.monster.starter.core.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 跨域配置
 * @author kuang
 */
@Data
@Configuration("ConfigStarter")
@ConfigurationProperties(prefix = "monster.cors")
public class CorsConfig {
    /**
     * 跨域开关
     */
    private boolean onOff = true;
    /**
     * 预请求有效时长
     */
    private String maxAge = "18000L";
    /**
     * 可访问得域名
     */
    private String origin = "*";
    /**
     * 可访问得方法
     */
    private String methods = "POST,GET,OPTIONS";
    /**
     * 可访问得请求头
     */
    private String allowHeaders = "*";
    /**
     * 可访问得响应头
     */
    private String exposeHeaders = "*";

}
